using System.ComponentModel.DataAnnotations.Schema;
using System.Data.Entity.ModelConfiguration;

namespace EFDataBase.Models.Mapping
{
    public class record_askwater_backMap : EntityTypeConfiguration<record_askwater_back>
    {
        public record_askwater_backMap()
        {
            // Primary Key
            this.HasKey(t => t.id);

            // Properties
            this.Property(t => t.id)
                .IsRequired()
                .HasMaxLength(150);

            this.Property(t => t.area)
                .HasMaxLength(50);

            this.Property(t => t.Louhao)
                .HasMaxLength(50);

            this.Property(t => t.sushe_number)
                .HasMaxLength(50);

            this.Property(t => t.brand)
                .HasMaxLength(50);

            this.Property(t => t.shengyu_tongshu)
                .HasMaxLength(150);

            this.Property(t => t.songshui_tongshu)
                .HasMaxLength(50);

            this.Property(t => t.huishou_tongshu)
                .HasMaxLength(50);

            this.Property(t => t.qian_songshui)
                .HasMaxLength(50);

            this.Property(t => t.ask_watertime)
                .HasMaxLength(50);

            this.Property(t => t.beizu)
                .HasMaxLength(50);

            this.Property(t => t.songshui_gong)
                .HasMaxLength(50);

            this.Property(t => t.state)
                .IsFixedLength()
                .HasMaxLength(10);

            this.Property(t => t.state_text)
                .HasMaxLength(150);

            this.Property(t => t.delect)
                .IsFixedLength()
                .HasMaxLength(10);

            this.Property(t => t.delect_text)
                .IsFixedLength()
                .HasMaxLength(10);

            // Table & Column Mappings
            this.ToTable("record_askwater_back");
            this.Property(t => t.id).HasColumnName("id");
            this.Property(t => t.area).HasColumnName("area");
            this.Property(t => t.Louhao).HasColumnName("Louhao");
            this.Property(t => t.sushe_number).HasColumnName("sushe_number");
            this.Property(t => t.brand).HasColumnName("brand");
            this.Property(t => t.shengyu_tongshu).HasColumnName("shengyu_tongshu");
            this.Property(t => t.songshui_tongshu).HasColumnName("songshui_tongshu");
            this.Property(t => t.huishou_tongshu).HasColumnName("huishou_tongshu");
            this.Property(t => t.qian_songshui).HasColumnName("qian_songshui");
            this.Property(t => t.ask_watertime).HasColumnName("ask_watertime");
            this.Property(t => t.beizu).HasColumnName("beizu");
            this.Property(t => t.songshui_gong).HasColumnName("songshui_gong");
            this.Property(t => t.state).HasColumnName("state");
            this.Property(t => t.state_text).HasColumnName("state_text");
            this.Property(t => t.delect).HasColumnName("delect");
            this.Property(t => t.delect_text).HasColumnName("delect_text");
            this.Property(t => t.update_time).HasColumnName("update_time");
        }
    }
}
